{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "50946a8e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 调用requests模块(google chrome 浏览器)\n",
    "import requests\n",
    "\n",
    "# 2.请求方式：get\n",
    "\n",
    "# 3.URL地址\n",
    "geo_url = \"https://restapi.amap.com/v3/geocode/geo?parameters\"\n",
    "\n",
    "# 4.准备参数，用于交换数据payload\n",
    "payload = {\n",
    "    \"key\":\"4a48fbc57c6fa9b852ff8e9c92a7156b\",\n",
    "    \"address\":\"广东省汕头市潮阳区潮阳林百欣中学\"\n",
    "}\n",
    "\n",
    "# 5.发起请求\n",
    "r = requests.get(url=geo_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "3c56bb20",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "33857dce",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'geocodes': [{'formatted_address': '广东省汕头市潮阳区林百欣中学',\n",
       "   'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'citycode': '0754',\n",
       "   'city': '汕头市',\n",
       "   'district': '潮阳区',\n",
       "   'township': [],\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'adcode': '440513',\n",
       "   'street': [],\n",
       "   'number': [],\n",
       "   'location': '116.584994,23.257964',\n",
       "   'level': '兴趣点'}]}"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "3a36b93a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'116.584994,23.257964'"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "潮阳林百欣中学_location = r.json()['geocodes'][0]['location']\n",
    "潮阳林百欣中学_location"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "366b1fd7",
   "metadata": {},
   "outputs": [],
   "source": [
    "# extensions=all\n",
    "import requests\n",
    "\n",
    "regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "\n",
    "# 4.准备参数，用于交换数据payload\n",
    "payload = {\n",
    "    \"key\":\"4a48fbc57c6fa9b852ff8e9c92a7156b\",\n",
    "    \"location\":潮阳林百欣中学_location\n",
    "}\n",
    "\n",
    "r = requests.get(url=regeo_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "a0b3d407",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "7f2b4337",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'addressComponent': {'city': '汕头市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440513',\n",
       "   'district': '潮阳区',\n",
       "   'towncode': '440513001000',\n",
       "   'streetNumber': {'number': '336号',\n",
       "    'location': '116.585559,23.256967',\n",
       "    'direction': '东南',\n",
       "    'distance': '124.988',\n",
       "    'street': '棉西路'},\n",
       "   'country': '中国',\n",
       "   'township': '文光街道',\n",
       "   'businessAreas': [[]],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '0754'},\n",
       "  'formatted_address': '广东省汕头市潮阳区文光街道潮阳林百欣中学'},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "819f3c13",
   "metadata": {},
   "outputs": [],
   "source": [
    "# extensions=all\n",
    "import requests\n",
    "\n",
    "regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "\n",
    "# 4.准备参数，用于交换数据payload\n",
    "payload = {\n",
    "    \"key\":\"4a48fbc57c6fa9b852ff8e9c92a7156b\",\n",
    "    \"location\":潮阳林百欣中学_location,\n",
    "    \"extensions\":\"all\",\n",
    "    \"poitype\":\"true\",\n",
    "    \n",
    "}\n",
    "\n",
    "r = requests.get(url=regeo_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "0469a4ce",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "d16e3369",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'regeocode': {'formatted_address': '广东省汕头市潮阳区文光街道潮阳林百欣中学',\n",
       "  'addressComponent': {'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'city': '汕头市',\n",
       "   'citycode': '0754',\n",
       "   'district': '潮阳区',\n",
       "   'adcode': '440513',\n",
       "   'township': '文光街道',\n",
       "   'towncode': '440513001000',\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'streetNumber': {'street': '棉西路',\n",
       "    'number': '336号',\n",
       "    'location': '116.585559,23.256967',\n",
       "    'direction': '东南',\n",
       "    'distance': '124.988'},\n",
       "   'businessAreas': [[]]},\n",
       "  'pois': [{'id': 'B02F201RPW',\n",
       "    'name': '潮阳林百欣中学',\n",
       "    'type': '科教文化服务;学校;中学',\n",
       "    'tel': '0754-83829144',\n",
       "    'direction': '北',\n",
       "    'distance': '2.61417',\n",
       "    'location': '116.584989,23.257987',\n",
       "    'address': '文光街道棉西路336号',\n",
       "    'poiweight': '0.455834',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B02F20O9G8',\n",
       "    'name': '检测站',\n",
       "    'type': '政府机构及社会团体;交通车辆管理;验车场',\n",
       "    'tel': [],\n",
       "    'direction': '东南',\n",
       "    'distance': '202.245',\n",
       "    'location': '116.586630,23.256940',\n",
       "    'address': '棉城棉西路309号后面',\n",
       "    'poiweight': '0.143265',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B02F20OAHH',\n",
       "    'name': '潮阳海关缉私分局',\n",
       "    'type': '政府机构及社会团体;政府机关;区县级政府及事业单位',\n",
       "    'tel': [],\n",
       "    'direction': '西南',\n",
       "    'distance': '248.922',\n",
       "    'location': '116.583761,23.256033',\n",
       "    'address': '城西五路与棉西路交叉路口往西北约150米',\n",
       "    'poiweight': '0.140687',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFFAH49L',\n",
       "    'name': '格林豪泰酒店(汕头棉西路店)',\n",
       "    'type': '住宿服务;宾馆酒店;经济型连锁酒店',\n",
       "    'tel': '0754-87129999',\n",
       "    'direction': '东南',\n",
       "    'distance': '201.898',\n",
       "    'location': '116.586642,23.256962',\n",
       "    'address': '棉西路309号',\n",
       "    'poiweight': '0.309997',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFF45FA3',\n",
       "    'name': '金源工业大厦',\n",
       "    'type': '商务住宅;楼宇;商务写字楼',\n",
       "    'tel': [],\n",
       "    'direction': '东',\n",
       "    'distance': '312.987',\n",
       "    'location': '116.588046,23.258206',\n",
       "    'address': '棉城西门工业区三街',\n",
       "    'poiweight': '0.216668',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFG80NH9',\n",
       "    'name': '潮阳电商创业园',\n",
       "    'type': '商务住宅;产业园区;产业园区',\n",
       "    'tel': '0754-86619888',\n",
       "    'direction': '东',\n",
       "    'distance': '298.045',\n",
       "    'location': '116.587849,23.258515',\n",
       "    'address': '棉西路附近',\n",
       "    'poiweight': '0.21374',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B02F20O9G5',\n",
       "    'name': '司法局住宅区',\n",
       "    'type': '商务住宅;住宅区;住宅小区',\n",
       "    'tel': [],\n",
       "    'direction': '南',\n",
       "    'distance': '267.819',\n",
       "    'location': '116.584342,23.255631',\n",
       "    'address': '棉西路与城西五路交叉口西南约60米',\n",
       "    'poiweight': '0.168303',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B02F20NSTY',\n",
       "    'name': '潮阳区进出境货运车辆检验场',\n",
       "    'type': '政府机构及社会团体;交通车辆管理;验车场',\n",
       "    'tel': [],\n",
       "    'direction': '西南',\n",
       "    'distance': '297.704',\n",
       "    'location': '116.583237,23.255828',\n",
       "    'address': '棉西路海关大楼西南侧约30米',\n",
       "    'poiweight': '0.143265',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B02F200E22',\n",
       "    'name': '汕头市潮阳区建设局',\n",
       "    'type': '政府机构及社会团体;政府机关;区县级政府及事业单位',\n",
       "    'tel': '0754-83605568',\n",
       "    'direction': '东南',\n",
       "    'distance': '339.919',\n",
       "    'location': '116.587604,23.256068',\n",
       "    'address': '棉西路305号建设大厦',\n",
       "    'poiweight': '0.259244',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B02F20NQBQ',\n",
       "    'name': '汕头海关监管场所',\n",
       "    'type': '政府机构及社会团体;政府机关;区县级政府及事业单位',\n",
       "    'tel': [],\n",
       "    'direction': '西南',\n",
       "    'distance': '297.704',\n",
       "    'location': '116.583237,23.255828',\n",
       "    'address': '棉西路潮阳海关缉私分局',\n",
       "    'poiweight': '0.140687',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFFU3JGE',\n",
       "    'name': '东鹏家私生活馆',\n",
       "    'type': '购物服务;家居建材市场;家具城',\n",
       "    'tel': '0754-83600068',\n",
       "    'direction': '东',\n",
       "    'distance': '294.742',\n",
       "    'location': '116.587879,23.257968',\n",
       "    'address': '文光西门加工区工业厂房第三街第一栋即棉西路303号附近',\n",
       "    'poiweight': '0.191799',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFGDPW3G',\n",
       "    'name': '潮阳市西门工业区(棉西路)',\n",
       "    'type': '商务住宅;产业园区;产业园区',\n",
       "    'tel': [],\n",
       "    'direction': '东',\n",
       "    'distance': '356.019',\n",
       "    'location': '116.588251,23.259102',\n",
       "    'address': '棉西路与城西二路交叉口西北约180米',\n",
       "    'poiweight': '0.21484',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B02F20NQJC',\n",
       "    'name': '汕头市科泰磁电有限公司',\n",
       "    'type': '公司企业;公司;公司',\n",
       "    'tel': '0754-83826283',\n",
       "    'direction': '东北',\n",
       "    'distance': '229.392',\n",
       "    'location': '116.586922,23.259021',\n",
       "    'address': '棉城镇西门工业区',\n",
       "    'poiweight': '0.133815',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFHSMOG3',\n",
       "    'name': '旭升红木馆',\n",
       "    'type': '购物服务;家居建材市场;家具城',\n",
       "    'tel': '0754-83835353',\n",
       "    'direction': '北',\n",
       "    'distance': '219.395',\n",
       "    'location': '116.584698,23.259918',\n",
       "    'address': '城西大道324国道鸿泰华府7座',\n",
       "    'poiweight': '0.163446',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFFHBUF2',\n",
       "    'name': '格林茗点',\n",
       "    'type': '餐饮服务;茶艺馆;茶艺馆',\n",
       "    'tel': '0754-87296666',\n",
       "    'direction': '东南',\n",
       "    'distance': '199.112',\n",
       "    'location': '116.586555,23.256892',\n",
       "    'address': '棉西路309号(林百欣中学斜对面)',\n",
       "    'poiweight': '0.160853',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFHHGV8N',\n",
       "    'name': '海关大楼',\n",
       "    'type': '商务住宅;楼宇;商务写字楼',\n",
       "    'tel': [],\n",
       "    'direction': '西南',\n",
       "    'distance': '231.172',\n",
       "    'location': '116.583581,23.256340',\n",
       "    'address': '棉西路',\n",
       "    'poiweight': '0.215822',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFLD9785',\n",
       "    'name': '潮阳区机动车检测站',\n",
       "    'type': '政府机构及社会团体;交通车辆管理;验车场',\n",
       "    'tel': '0754-88558555',\n",
       "    'direction': '东南',\n",
       "    'distance': '240.143',\n",
       "    'location': '116.586408,23.256239',\n",
       "    'address': '棉西路309号',\n",
       "    'poiweight': '0.113333',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFMCJYG5',\n",
       "    'name': '全友家居(鸿泰华府店)',\n",
       "    'type': '购物服务;家居建材市场;家居建材市场',\n",
       "    'tel': '0754-89399107',\n",
       "    'direction': '北',\n",
       "    'distance': '242.142',\n",
       "    'location': '116.584954,23.260141',\n",
       "    'address': '鸿泰华府6幢101号商铺',\n",
       "    'poiweight': '0.164008',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFGNM95N',\n",
       "    'name': '鸿泰华府',\n",
       "    'type': '商务住宅;住宅区;住宅小区',\n",
       "    'tel': '0754-89392888',\n",
       "    'direction': '北',\n",
       "    'distance': '256.555',\n",
       "    'location': '116.585658,23.260189',\n",
       "    'address': '城西大道与城西三路交叉口西南约160米',\n",
       "    'poiweight': '0.221063',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFJFFKSG',\n",
       "    'name': '卡诺亚全屋定制',\n",
       "    'type': '购物服务;家居建材市场;家居建材市场',\n",
       "    'tel': '13682864192;18675666989',\n",
       "    'direction': '北',\n",
       "    'distance': '272.391',\n",
       "    'location': '116.585252,23.260402',\n",
       "    'address': '鸿泰华府6幢105号',\n",
       "    'poiweight': '0.16406',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFIZY0O2',\n",
       "    'name': '中公教育(广东汕头潮阳学习中心校区)',\n",
       "    'type': '科教文化服务;培训机构;培训机构',\n",
       "    'tel': [],\n",
       "    'direction': '东',\n",
       "    'distance': '279.506',\n",
       "    'location': '116.587611,23.258696',\n",
       "    'address': '文光街道西门工业区电商创业园3号楼601室',\n",
       "    'poiweight': '0.176369',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFLOIMWD',\n",
       "    'name': '博德幼儿园',\n",
       "    'type': '科教文化服务;学校;幼儿园',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '280.025',\n",
       "    'location': '116.587283,23.259349',\n",
       "    'address': '文光街道棉城工业区4街君豪水疗休闲中心对面',\n",
       "    'poiweight': '0.215489',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0GUXD7PGC',\n",
       "    'name': '汕头市潮阳区创业孵化基地',\n",
       "    'type': '商务住宅;产业园区;产业园区',\n",
       "    'tel': [],\n",
       "    'direction': '东',\n",
       "    'distance': '283.781',\n",
       "    'location': '116.587681,23.258610',\n",
       "    'address': '城西三路与棉西路交叉口北约120米',\n",
       "    'poiweight': '0.240392',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKLECUO',\n",
       "    'name': '百得胜全屋定制(潮阳店)',\n",
       "    'type': '购物服务;家居建材市场;家居建材市场',\n",
       "    'tel': '19903011462',\n",
       "    'direction': '北',\n",
       "    'distance': '296.604',\n",
       "    'location': '116.585483,23.260593',\n",
       "    'address': '城西大道鸿泰华府5栋111-112号',\n",
       "    'poiweight': '0.163966',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFJF4JVQ',\n",
       "    'name': '铭洋汽车养护中心',\n",
       "    'type': '汽车服务;汽车服务相关;汽车服务相关',\n",
       "    'tel': [],\n",
       "    'direction': '西北',\n",
       "    'distance': '157.02',\n",
       "    'location': '116.583723,23.258758',\n",
       "    'address': 'G324(城西大道)',\n",
       "    'poiweight': '0.14476',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFIQWEEF',\n",
       "    'name': '中训电脑教育',\n",
       "    'type': '科教文化服务;培训机构;培训机构',\n",
       "    'tel': '0754-83608660',\n",
       "    'direction': '东',\n",
       "    'distance': '311.618',\n",
       "    'location': '116.588033,23.258202',\n",
       "    'address': '金源工业大厦3号楼',\n",
       "    'poiweight': '0.133868',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B02F20234Y',\n",
       "    'name': '中国平安财产保险股份有限公司(潮阳支公司)',\n",
       "    'type': '金融保险服务;保险公司;中国平安保险公司',\n",
       "    'tel': [],\n",
       "    'direction': '东南',\n",
       "    'distance': '191.064',\n",
       "    'location': '116.586451,23.256887',\n",
       "    'address': '棉西路309号潮阳林百欣中学斜',\n",
       "    'poiweight': '0.355356',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFLMY2A4',\n",
       "    'name': '顺德家具',\n",
       "    'type': '购物服务;家居建材市场;家具城',\n",
       "    'tel': [],\n",
       "    'direction': '西南',\n",
       "    'distance': '320.173',\n",
       "    'location': '116.582234,23.256600',\n",
       "    'address': '棉西路海关大楼侧(林百欣中学前50米)',\n",
       "    'poiweight': '0.178108',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B02F20NUM6',\n",
       "    'name': '汕头市潮阳第一建安总公司',\n",
       "    'type': '公司企业;公司;建筑公司',\n",
       "    'tel': '0754-83607882',\n",
       "    'direction': '东南',\n",
       "    'distance': '339.919',\n",
       "    'location': '116.587604,23.256068',\n",
       "    'address': '文光棉西路305号建设大院内',\n",
       "    'poiweight': '0.259326',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKM7FVN',\n",
       "    'name': '鹿鸣艺术',\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所',\n",
       "    'tel': '13424488364',\n",
       "    'direction': '东北',\n",
       "    'distance': '330.564',\n",
       "    'location': '116.586451,23.260618',\n",
       "    'address': '棉北街道鸿泰华府4幢102',\n",
       "    'poiweight': '0.174348',\n",
       "    'businessarea': []}],\n",
       "  'roads': [{'id': '0754F50F009021240',\n",
       "    'name': '棉西路',\n",
       "    'direction': '西北',\n",
       "    'distance': '156.22',\n",
       "    'location': '116.586,23.2567'},\n",
       "   {'id': '0754F50F009021231',\n",
       "    'name': '城西四路',\n",
       "    'direction': '北',\n",
       "    'distance': '158.212',\n",
       "    'location': '116.586,23.2566'},\n",
       "   {'id': '0754F50F009021314',\n",
       "    'name': '城西大道',\n",
       "    'direction': '东南',\n",
       "    'distance': '180.931',\n",
       "    'location': '116.584,23.2589'}],\n",
       "  'roadinters': [{'direction': '北',\n",
       "    'distance': '166.246',\n",
       "    'location': '116.585548,23.256558',\n",
       "    'first_id': '0754F50F009021231',\n",
       "    'first_name': '城西四路',\n",
       "    'second_id': '0754F50F009021240',\n",
       "    'second_name': '棉西路'}],\n",
       "  'aois': [{'id': 'B02F201RPW',\n",
       "    'name': '潮阳林百欣中学',\n",
       "    'adcode': '440513',\n",
       "    'location': '116.584989,23.257987',\n",
       "    'area': '30499.679976',\n",
       "    'distance': '0',\n",
       "    'type': '141202'}]}}"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "d69c3d96",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "5b12d744",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>tel</th>\n",
       "      <th>direction</th>\n",
       "      <th>distance</th>\n",
       "      <th>location</th>\n",
       "      <th>address</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>businessarea</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>B02F201RPW</td>\n",
       "      <td>潮阳林百欣中学</td>\n",
       "      <td>科教文化服务;学校;中学</td>\n",
       "      <td>0754-83829144</td>\n",
       "      <td>北</td>\n",
       "      <td>2.61417</td>\n",
       "      <td>116.584989,23.257987</td>\n",
       "      <td>文光街道棉西路336号</td>\n",
       "      <td>0.455834</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>B02F20O9G8</td>\n",
       "      <td>检测站</td>\n",
       "      <td>政府机构及社会团体;交通车辆管理;验车场</td>\n",
       "      <td>[]</td>\n",
       "      <td>东南</td>\n",
       "      <td>202.245</td>\n",
       "      <td>116.586630,23.256940</td>\n",
       "      <td>棉城棉西路309号后面</td>\n",
       "      <td>0.143265</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B02F20OAHH</td>\n",
       "      <td>潮阳海关缉私分局</td>\n",
       "      <td>政府机构及社会团体;政府机关;区县级政府及事业单位</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>248.922</td>\n",
       "      <td>116.583761,23.256033</td>\n",
       "      <td>城西五路与棉西路交叉路口往西北约150米</td>\n",
       "      <td>0.140687</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B0FFFAH49L</td>\n",
       "      <td>格林豪泰酒店(汕头棉西路店)</td>\n",
       "      <td>住宿服务;宾馆酒店;经济型连锁酒店</td>\n",
       "      <td>0754-87129999</td>\n",
       "      <td>东南</td>\n",
       "      <td>201.898</td>\n",
       "      <td>116.586642,23.256962</td>\n",
       "      <td>棉西路309号</td>\n",
       "      <td>0.309997</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>B0FFF45FA3</td>\n",
       "      <td>金源工业大厦</td>\n",
       "      <td>商务住宅;楼宇;商务写字楼</td>\n",
       "      <td>[]</td>\n",
       "      <td>东</td>\n",
       "      <td>312.987</td>\n",
       "      <td>116.588046,23.258206</td>\n",
       "      <td>棉城西门工业区三街</td>\n",
       "      <td>0.216668</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B0FFG80NH9</td>\n",
       "      <td>潮阳电商创业园</td>\n",
       "      <td>商务住宅;产业园区;产业园区</td>\n",
       "      <td>0754-86619888</td>\n",
       "      <td>东</td>\n",
       "      <td>298.045</td>\n",
       "      <td>116.587849,23.258515</td>\n",
       "      <td>棉西路附近</td>\n",
       "      <td>0.21374</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>B02F20O9G5</td>\n",
       "      <td>司法局住宅区</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "      <td>[]</td>\n",
       "      <td>南</td>\n",
       "      <td>267.819</td>\n",
       "      <td>116.584342,23.255631</td>\n",
       "      <td>棉西路与城西五路交叉口西南约60米</td>\n",
       "      <td>0.168303</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B02F20NSTY</td>\n",
       "      <td>潮阳区进出境货运车辆检验场</td>\n",
       "      <td>政府机构及社会团体;交通车辆管理;验车场</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>297.704</td>\n",
       "      <td>116.583237,23.255828</td>\n",
       "      <td>棉西路海关大楼西南侧约30米</td>\n",
       "      <td>0.143265</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B02F200E22</td>\n",
       "      <td>汕头市潮阳区建设局</td>\n",
       "      <td>政府机构及社会团体;政府机关;区县级政府及事业单位</td>\n",
       "      <td>0754-83605568</td>\n",
       "      <td>东南</td>\n",
       "      <td>339.919</td>\n",
       "      <td>116.587604,23.256068</td>\n",
       "      <td>棉西路305号建设大厦</td>\n",
       "      <td>0.259244</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B02F20NQBQ</td>\n",
       "      <td>汕头海关监管场所</td>\n",
       "      <td>政府机构及社会团体;政府机关;区县级政府及事业单位</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>297.704</td>\n",
       "      <td>116.583237,23.255828</td>\n",
       "      <td>棉西路潮阳海关缉私分局</td>\n",
       "      <td>0.140687</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B0FFFU3JGE</td>\n",
       "      <td>东鹏家私生活馆</td>\n",
       "      <td>购物服务;家居建材市场;家具城</td>\n",
       "      <td>0754-83600068</td>\n",
       "      <td>东</td>\n",
       "      <td>294.742</td>\n",
       "      <td>116.587879,23.257968</td>\n",
       "      <td>文光西门加工区工业厂房第三街第一栋即棉西路303号附近</td>\n",
       "      <td>0.191799</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>B0FFGDPW3G</td>\n",
       "      <td>潮阳市西门工业区(棉西路)</td>\n",
       "      <td>商务住宅;产业园区;产业园区</td>\n",
       "      <td>[]</td>\n",
       "      <td>东</td>\n",
       "      <td>356.019</td>\n",
       "      <td>116.588251,23.259102</td>\n",
       "      <td>棉西路与城西二路交叉口西北约180米</td>\n",
       "      <td>0.21484</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>B02F20NQJC</td>\n",
       "      <td>汕头市科泰磁电有限公司</td>\n",
       "      <td>公司企业;公司;公司</td>\n",
       "      <td>0754-83826283</td>\n",
       "      <td>东北</td>\n",
       "      <td>229.392</td>\n",
       "      <td>116.586922,23.259021</td>\n",
       "      <td>棉城镇西门工业区</td>\n",
       "      <td>0.133815</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>B0FFHSMOG3</td>\n",
       "      <td>旭升红木馆</td>\n",
       "      <td>购物服务;家居建材市场;家具城</td>\n",
       "      <td>0754-83835353</td>\n",
       "      <td>北</td>\n",
       "      <td>219.395</td>\n",
       "      <td>116.584698,23.259918</td>\n",
       "      <td>城西大道324国道鸿泰华府7座</td>\n",
       "      <td>0.163446</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>B0FFFHBUF2</td>\n",
       "      <td>格林茗点</td>\n",
       "      <td>餐饮服务;茶艺馆;茶艺馆</td>\n",
       "      <td>0754-87296666</td>\n",
       "      <td>东南</td>\n",
       "      <td>199.112</td>\n",
       "      <td>116.586555,23.256892</td>\n",
       "      <td>棉西路309号(林百欣中学斜对面)</td>\n",
       "      <td>0.160853</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>B0FFHHGV8N</td>\n",
       "      <td>海关大楼</td>\n",
       "      <td>商务住宅;楼宇;商务写字楼</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>231.172</td>\n",
       "      <td>116.583581,23.256340</td>\n",
       "      <td>棉西路</td>\n",
       "      <td>0.215822</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>B0FFLD9785</td>\n",
       "      <td>潮阳区机动车检测站</td>\n",
       "      <td>政府机构及社会团体;交通车辆管理;验车场</td>\n",
       "      <td>0754-88558555</td>\n",
       "      <td>东南</td>\n",
       "      <td>240.143</td>\n",
       "      <td>116.586408,23.256239</td>\n",
       "      <td>棉西路309号</td>\n",
       "      <td>0.113333</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>B0FFMCJYG5</td>\n",
       "      <td>全友家居(鸿泰华府店)</td>\n",
       "      <td>购物服务;家居建材市场;家居建材市场</td>\n",
       "      <td>0754-89399107</td>\n",
       "      <td>北</td>\n",
       "      <td>242.142</td>\n",
       "      <td>116.584954,23.260141</td>\n",
       "      <td>鸿泰华府6幢101号商铺</td>\n",
       "      <td>0.164008</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>B0FFGNM95N</td>\n",
       "      <td>鸿泰华府</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "      <td>0754-89392888</td>\n",
       "      <td>北</td>\n",
       "      <td>256.555</td>\n",
       "      <td>116.585658,23.260189</td>\n",
       "      <td>城西大道与城西三路交叉口西南约160米</td>\n",
       "      <td>0.221063</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>B0FFJFFKSG</td>\n",
       "      <td>卡诺亚全屋定制</td>\n",
       "      <td>购物服务;家居建材市场;家居建材市场</td>\n",
       "      <td>13682864192;18675666989</td>\n",
       "      <td>北</td>\n",
       "      <td>272.391</td>\n",
       "      <td>116.585252,23.260402</td>\n",
       "      <td>鸿泰华府6幢105号</td>\n",
       "      <td>0.16406</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>B0FFIZY0O2</td>\n",
       "      <td>中公教育(广东汕头潮阳学习中心校区)</td>\n",
       "      <td>科教文化服务;培训机构;培训机构</td>\n",
       "      <td>[]</td>\n",
       "      <td>东</td>\n",
       "      <td>279.506</td>\n",
       "      <td>116.587611,23.258696</td>\n",
       "      <td>文光街道西门工业区电商创业园3号楼601室</td>\n",
       "      <td>0.176369</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>B0FFLOIMWD</td>\n",
       "      <td>博德幼儿园</td>\n",
       "      <td>科教文化服务;学校;幼儿园</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>280.025</td>\n",
       "      <td>116.587283,23.259349</td>\n",
       "      <td>文光街道棉城工业区4街君豪水疗休闲中心对面</td>\n",
       "      <td>0.215489</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>B0GUXD7PGC</td>\n",
       "      <td>汕头市潮阳区创业孵化基地</td>\n",
       "      <td>商务住宅;产业园区;产业园区</td>\n",
       "      <td>[]</td>\n",
       "      <td>东</td>\n",
       "      <td>283.781</td>\n",
       "      <td>116.587681,23.258610</td>\n",
       "      <td>城西三路与棉西路交叉口北约120米</td>\n",
       "      <td>0.240392</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>B0FFKLECUO</td>\n",
       "      <td>百得胜全屋定制(潮阳店)</td>\n",
       "      <td>购物服务;家居建材市场;家居建材市场</td>\n",
       "      <td>19903011462</td>\n",
       "      <td>北</td>\n",
       "      <td>296.604</td>\n",
       "      <td>116.585483,23.260593</td>\n",
       "      <td>城西大道鸿泰华府5栋111-112号</td>\n",
       "      <td>0.163966</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>B0FFJF4JVQ</td>\n",
       "      <td>铭洋汽车养护中心</td>\n",
       "      <td>汽车服务;汽车服务相关;汽车服务相关</td>\n",
       "      <td>[]</td>\n",
       "      <td>西北</td>\n",
       "      <td>157.02</td>\n",
       "      <td>116.583723,23.258758</td>\n",
       "      <td>G324(城西大道)</td>\n",
       "      <td>0.14476</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>B0FFIQWEEF</td>\n",
       "      <td>中训电脑教育</td>\n",
       "      <td>科教文化服务;培训机构;培训机构</td>\n",
       "      <td>0754-83608660</td>\n",
       "      <td>东</td>\n",
       "      <td>311.618</td>\n",
       "      <td>116.588033,23.258202</td>\n",
       "      <td>金源工业大厦3号楼</td>\n",
       "      <td>0.133868</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>B02F20234Y</td>\n",
       "      <td>中国平安财产保险股份有限公司(潮阳支公司)</td>\n",
       "      <td>金融保险服务;保险公司;中国平安保险公司</td>\n",
       "      <td>[]</td>\n",
       "      <td>东南</td>\n",
       "      <td>191.064</td>\n",
       "      <td>116.586451,23.256887</td>\n",
       "      <td>棉西路309号潮阳林百欣中学斜</td>\n",
       "      <td>0.355356</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>B0FFLMY2A4</td>\n",
       "      <td>顺德家具</td>\n",
       "      <td>购物服务;家居建材市场;家具城</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>320.173</td>\n",
       "      <td>116.582234,23.256600</td>\n",
       "      <td>棉西路海关大楼侧(林百欣中学前50米)</td>\n",
       "      <td>0.178108</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>B02F20NUM6</td>\n",
       "      <td>汕头市潮阳第一建安总公司</td>\n",
       "      <td>公司企业;公司;建筑公司</td>\n",
       "      <td>0754-83607882</td>\n",
       "      <td>东南</td>\n",
       "      <td>339.919</td>\n",
       "      <td>116.587604,23.256068</td>\n",
       "      <td>文光棉西路305号建设大院内</td>\n",
       "      <td>0.259326</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>B0FFKM7FVN</td>\n",
       "      <td>鹿鸣艺术</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>13424488364</td>\n",
       "      <td>东北</td>\n",
       "      <td>330.564</td>\n",
       "      <td>116.586451,23.260618</td>\n",
       "      <td>棉北街道鸿泰华府4幢102</td>\n",
       "      <td>0.174348</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            id                   name                       type  \\\n",
       "0   B02F201RPW                潮阳林百欣中学               科教文化服务;学校;中学   \n",
       "1   B02F20O9G8                    检测站       政府机构及社会团体;交通车辆管理;验车场   \n",
       "2   B02F20OAHH               潮阳海关缉私分局  政府机构及社会团体;政府机关;区县级政府及事业单位   \n",
       "3   B0FFFAH49L         格林豪泰酒店(汕头棉西路店)          住宿服务;宾馆酒店;经济型连锁酒店   \n",
       "4   B0FFF45FA3                 金源工业大厦              商务住宅;楼宇;商务写字楼   \n",
       "5   B0FFG80NH9                潮阳电商创业园             商务住宅;产业园区;产业园区   \n",
       "6   B02F20O9G5                 司法局住宅区              商务住宅;住宅区;住宅小区   \n",
       "7   B02F20NSTY          潮阳区进出境货运车辆检验场       政府机构及社会团体;交通车辆管理;验车场   \n",
       "8   B02F200E22              汕头市潮阳区建设局  政府机构及社会团体;政府机关;区县级政府及事业单位   \n",
       "9   B02F20NQBQ               汕头海关监管场所  政府机构及社会团体;政府机关;区县级政府及事业单位   \n",
       "10  B0FFFU3JGE                东鹏家私生活馆            购物服务;家居建材市场;家具城   \n",
       "11  B0FFGDPW3G          潮阳市西门工业区(棉西路)             商务住宅;产业园区;产业园区   \n",
       "12  B02F20NQJC            汕头市科泰磁电有限公司                 公司企业;公司;公司   \n",
       "13  B0FFHSMOG3                  旭升红木馆            购物服务;家居建材市场;家具城   \n",
       "14  B0FFFHBUF2                   格林茗点               餐饮服务;茶艺馆;茶艺馆   \n",
       "15  B0FFHHGV8N                   海关大楼              商务住宅;楼宇;商务写字楼   \n",
       "16  B0FFLD9785              潮阳区机动车检测站       政府机构及社会团体;交通车辆管理;验车场   \n",
       "17  B0FFMCJYG5            全友家居(鸿泰华府店)         购物服务;家居建材市场;家居建材市场   \n",
       "18  B0FFGNM95N                   鸿泰华府              商务住宅;住宅区;住宅小区   \n",
       "19  B0FFJFFKSG                卡诺亚全屋定制         购物服务;家居建材市场;家居建材市场   \n",
       "20  B0FFIZY0O2     中公教育(广东汕头潮阳学习中心校区)           科教文化服务;培训机构;培训机构   \n",
       "21  B0FFLOIMWD                  博德幼儿园              科教文化服务;学校;幼儿园   \n",
       "22  B0GUXD7PGC           汕头市潮阳区创业孵化基地             商务住宅;产业园区;产业园区   \n",
       "23  B0FFKLECUO           百得胜全屋定制(潮阳店)         购物服务;家居建材市场;家居建材市场   \n",
       "24  B0FFJF4JVQ               铭洋汽车养护中心         汽车服务;汽车服务相关;汽车服务相关   \n",
       "25  B0FFIQWEEF                 中训电脑教育           科教文化服务;培训机构;培训机构   \n",
       "26  B02F20234Y  中国平安财产保险股份有限公司(潮阳支公司)       金融保险服务;保险公司;中国平安保险公司   \n",
       "27  B0FFLMY2A4                   顺德家具            购物服务;家居建材市场;家具城   \n",
       "28  B02F20NUM6           汕头市潮阳第一建安总公司               公司企业;公司;建筑公司   \n",
       "29  B0FFKM7FVN                   鹿鸣艺术       科教文化服务;科教文化场所;科教文化场所   \n",
       "\n",
       "                        tel direction distance              location  \\\n",
       "0             0754-83829144         北  2.61417  116.584989,23.257987   \n",
       "1                        []        东南  202.245  116.586630,23.256940   \n",
       "2                        []        西南  248.922  116.583761,23.256033   \n",
       "3             0754-87129999        东南  201.898  116.586642,23.256962   \n",
       "4                        []         东  312.987  116.588046,23.258206   \n",
       "5             0754-86619888         东  298.045  116.587849,23.258515   \n",
       "6                        []         南  267.819  116.584342,23.255631   \n",
       "7                        []        西南  297.704  116.583237,23.255828   \n",
       "8             0754-83605568        东南  339.919  116.587604,23.256068   \n",
       "9                        []        西南  297.704  116.583237,23.255828   \n",
       "10            0754-83600068         东  294.742  116.587879,23.257968   \n",
       "11                       []         东  356.019  116.588251,23.259102   \n",
       "12            0754-83826283        东北  229.392  116.586922,23.259021   \n",
       "13            0754-83835353         北  219.395  116.584698,23.259918   \n",
       "14            0754-87296666        东南  199.112  116.586555,23.256892   \n",
       "15                       []        西南  231.172  116.583581,23.256340   \n",
       "16            0754-88558555        东南  240.143  116.586408,23.256239   \n",
       "17            0754-89399107         北  242.142  116.584954,23.260141   \n",
       "18            0754-89392888         北  256.555  116.585658,23.260189   \n",
       "19  13682864192;18675666989         北  272.391  116.585252,23.260402   \n",
       "20                       []         东  279.506  116.587611,23.258696   \n",
       "21                       []        东北  280.025  116.587283,23.259349   \n",
       "22                       []         东  283.781  116.587681,23.258610   \n",
       "23              19903011462         北  296.604  116.585483,23.260593   \n",
       "24                       []        西北   157.02  116.583723,23.258758   \n",
       "25            0754-83608660         东  311.618  116.588033,23.258202   \n",
       "26                       []        东南  191.064  116.586451,23.256887   \n",
       "27                       []        西南  320.173  116.582234,23.256600   \n",
       "28            0754-83607882        东南  339.919  116.587604,23.256068   \n",
       "29              13424488364        东北  330.564  116.586451,23.260618   \n",
       "\n",
       "                        address poiweight businessarea  \n",
       "0                   文光街道棉西路336号  0.455834           []  \n",
       "1                   棉城棉西路309号后面  0.143265           []  \n",
       "2          城西五路与棉西路交叉路口往西北约150米  0.140687           []  \n",
       "3                       棉西路309号  0.309997           []  \n",
       "4                     棉城西门工业区三街  0.216668           []  \n",
       "5                         棉西路附近   0.21374           []  \n",
       "6             棉西路与城西五路交叉口西南约60米  0.168303           []  \n",
       "7                棉西路海关大楼西南侧约30米  0.143265           []  \n",
       "8                   棉西路305号建设大厦  0.259244           []  \n",
       "9                   棉西路潮阳海关缉私分局  0.140687           []  \n",
       "10  文光西门加工区工业厂房第三街第一栋即棉西路303号附近  0.191799           []  \n",
       "11           棉西路与城西二路交叉口西北约180米   0.21484           []  \n",
       "12                     棉城镇西门工业区  0.133815           []  \n",
       "13              城西大道324国道鸿泰华府7座  0.163446           []  \n",
       "14            棉西路309号(林百欣中学斜对面)  0.160853           []  \n",
       "15                          棉西路  0.215822           []  \n",
       "16                      棉西路309号  0.113333           []  \n",
       "17                 鸿泰华府6幢101号商铺  0.164008           []  \n",
       "18          城西大道与城西三路交叉口西南约160米  0.221063           []  \n",
       "19                   鸿泰华府6幢105号   0.16406           []  \n",
       "20        文光街道西门工业区电商创业园3号楼601室  0.176369           []  \n",
       "21        文光街道棉城工业区4街君豪水疗休闲中心对面  0.215489           []  \n",
       "22            城西三路与棉西路交叉口北约120米  0.240392           []  \n",
       "23           城西大道鸿泰华府5栋111-112号  0.163966           []  \n",
       "24                   G324(城西大道)   0.14476           []  \n",
       "25                    金源工业大厦3号楼  0.133868           []  \n",
       "26              棉西路309号潮阳林百欣中学斜  0.355356           []  \n",
       "27          棉西路海关大楼侧(林百欣中学前50米)  0.178108           []  \n",
       "28               文光棉西路305号建设大院内  0.259326           []  \n",
       "29                棉北街道鸿泰华府4幢102  0.174348           []  "
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['regeocode']['pois'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "8b49dbdb",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 调用requests模块(google chrome 浏览器)\n",
    "import requests\n",
    "\n",
    "# 2.请求方式：get\n",
    "\n",
    "# 3.URL地址\n",
    "around_url = \"https://restapi.amap.com/v5/place/around?parameters\"\n",
    "\n",
    "# 4.准备参数，用于交换数据payload\n",
    "payload = {\n",
    "    \"key\":\"4a48fbc57c6fa9b852ff8e9c92a7156b\",\n",
    "    \"location\":潮阳林百欣中学_location ,\n",
    "    \"types\":\"餐厅\",\n",
    "     \"show_fields\":\"photos,business,\"\n",
    "  \n",
    "}\n",
    "\n",
    "# 5.发起请求\n",
    "r = requests.get(url=around_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "c72b3864",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "f3217e5e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'name': '大鑫烧烤',\n",
       "   'id': 'B0H1N9B5AX',\n",
       "   'location': '116.586330,23.256858',\n",
       "   'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "   'typecode': '050118',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '汕头市',\n",
       "   'adname': '潮阳区',\n",
       "   'address': '文光街道棉西路309格林豪泰酒店楼下',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '0754',\n",
       "   'adcode': '440513',\n",
       "   'business': {'business_area': '文光', 'rectag': '烤串', 'keytag': '烤串'}},\n",
       "  {'name': '细弟烧烤',\n",
       "   'id': 'B0G0ZKXXOF',\n",
       "   'location': '116.586311,23.256815',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '汕头市',\n",
       "   'adname': '潮阳区',\n",
       "   'address': '棉西路309格林豪泰楼下',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '0754',\n",
       "   'adcode': '440513',\n",
       "   'business': {'business_area': '文光',\n",
       "    'tel': '17322502028',\n",
       "    'rectag': '烧烤',\n",
       "    'keytag': '烧烤',\n",
       "    'opentime_today': '08:00-05:00',\n",
       "    'opentime_week': '08:00-05:00'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/130f5b8aabccd2b4c6c565cee2f8c1b7'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/16daa2e477c88de966753f647d0af20b'}]},\n",
       "  {'name': '沙县小吃',\n",
       "   'id': 'B0HGFR6F15',\n",
       "   'location': '116.585816,23.256006',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '汕头市',\n",
       "   'adname': '潮阳区',\n",
       "   'address': '城西四路九-十号铺',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '0754',\n",
       "   'adcode': '440513',\n",
       "   'business': {'business_area': '文光',\n",
       "    'tel': '13809624679',\n",
       "    'rectag': '中餐',\n",
       "    'keytag': '中餐',\n",
       "    'rating': '4.1',\n",
       "    'opentime_today': '24小时营业',\n",
       "    'opentime_week': '00:00-24:00'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/6b3c83b9b907cf7e523cc0dbbf8327bd'}]},\n",
       "  {'name': '老私基酸菜鱼',\n",
       "   'id': 'B0GUPO0OJK',\n",
       "   'location': '116.584307,23.255787',\n",
       "   'type': '餐饮服务;中餐厅;四川菜(川菜)',\n",
       "   'typecode': '050102',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '汕头市',\n",
       "   'adname': '潮阳区',\n",
       "   'address': '司法局住宅区',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '0754',\n",
       "   'adcode': '440513',\n",
       "   'business': {'tel': '15089143379;18664999220',\n",
       "    'rectag': '川菜',\n",
       "    'keytag': '川菜',\n",
       "    'rating': '4.0',\n",
       "    'opentime_today': '11:00-03:00',\n",
       "    'opentime_week': '11:00-03:00'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/72804a451233ae928e521803680aeb14'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/41c7fcf405ce8efa9f226245309cc882'}]},\n",
       "  {'name': '老猪火足肉',\n",
       "   'id': 'B0H1T5GGZJ',\n",
       "   'location': '116.587154,23.259100',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '汕头市',\n",
       "   'adname': '潮阳区',\n",
       "   'address': '城西三路与棉西路交叉口北180米',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '0754',\n",
       "   'adcode': '440513',\n",
       "   'business': {'business_area': '文光', 'rectag': '中餐', 'keytag': '中餐'}},\n",
       "  {'name': '李记食店',\n",
       "   'id': 'B0FFL7D1F7',\n",
       "   'location': '116.585962,23.255808',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '汕头市',\n",
       "   'adname': '潮阳区',\n",
       "   'address': '城西四路林百欣中学对面豪门路口下来100米',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '0754',\n",
       "   'adcode': '440513',\n",
       "   'business': {'business_area': '文光',\n",
       "    'tel': '13556348321',\n",
       "    'rectag': '中餐',\n",
       "    'keytag': '中餐',\n",
       "    'rating': '3.6'}},\n",
       "  {'name': '云中饭店',\n",
       "   'id': 'B0HKALPETS',\n",
       "   'location': '116.583768,23.255336',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '汕头市',\n",
       "   'adname': '潮阳区',\n",
       "   'address': '棉北街道平北工业区维也纳酒店',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '0754',\n",
       "   'adcode': '440513',\n",
       "   'business': {'rectag': '中餐', 'keytag': '中餐', 'rating': '3.2'}},\n",
       "  {'name': '老二促肉(西门店)',\n",
       "   'id': 'B0H1ML0SVU',\n",
       "   'location': '116.588470,23.257683',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '汕头市',\n",
       "   'adname': '潮阳区',\n",
       "   'address': '西门大酒店',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '0754',\n",
       "   'adcode': '440513',\n",
       "   'business': {'business_area': '文光',\n",
       "    'rectag': '中餐',\n",
       "    'keytag': '中餐',\n",
       "    'rating': '2.7'}},\n",
       "  {'name': '乌记鲜活牛肉城(潮阳店)',\n",
       "   'id': 'B0FFH2YR56',\n",
       "   'location': '116.586128,23.254814',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '汕头市',\n",
       "   'adname': '潮阳区',\n",
       "   'address': '城南街道城西北路即豪门酒店对面',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '0754',\n",
       "   'adcode': '440513',\n",
       "   'business': {'business_area': '文光',\n",
       "    'tel': '13202198999',\n",
       "    'rectag': '火锅',\n",
       "    'keytag': '火锅',\n",
       "    'rating': '4.5',\n",
       "    'cost': '64.00'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4e88c5d6b974853560f40b03ed028041'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/5f22106a7b9805ad85a4df33852fc20a'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a04250507b4c797006ff42379efc0620'}]},\n",
       "  {'name': '豪门酒店川湘馆',\n",
       "   'id': 'B0FFL31J14',\n",
       "   'location': '116.585897,23.254228',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '汕头市',\n",
       "   'adname': '潮阳区',\n",
       "   'address': '豪门酒店内(川湘馆)',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '0754',\n",
       "   'adcode': '440513',\n",
       "   'business': {'tel': '13202128555',\n",
       "    'rectag': '湘菜',\n",
       "    'keytag': '湘菜',\n",
       "    'rating': '4.1',\n",
       "    'opentime_today': '10:00-05:07',\n",
       "    'opentime_week': '周一至周日:10:00-05:07'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4193049f8389524bf48837f00c333ab7'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a80d194e15598b82bd74604613970192'}]}],\n",
       " 'count': '10'}"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
